<?php
/***************************************************************************
 * 
 * Copyright (c) 2010 , Inc. All Rights Reserved
 * $Id$:TrxIntercepter.php,2010/06/12 16:49:48 
 * 
 **************************************************************************/
 
 
 
/**
 * @file TrxIntercepter.php
 * @author huqingping
 * @date 2010/06/12 16:49:48
 * @version 1.0 
 * @brief 
 *  
 **/

require_once 'db/Db.php';

class TrxIntercepter implements IIntercepter
{
	function before(IProxy $proxy,$name,$args)
	{
		TxScope::beginTx();
	}

	function after(IProxy $proxy,$name,$args,$ret)
	{
		TxScope::commit();
	}

	function exception(IProxy $proxy,$name,$args)
	{
		TxScope::rollback();
	}
}




/* vim: set ts=4 sw=4 sts=4 tw=100 noet: */